<template>
  <header>
    <div class="wrap header-box">
      <h1 class="logo">
        <a href="#">
          <img src="../assets/img/indexLogo.6f8ac4f0.png" alt="" />
        </a>
      </h1>
      <ul class="header-nav">
        <li
          :class="{ active: $route.path === '/home' }"
          @click="$route,$router.push('/')"
        >
          首页
        </li>
        <li
          :class="{ active: $route.path === '/goods' }"
          @click="$router.push('/goods')"
        >
          全部商品
        </li>
        <li
          :class="{ active: $route.path === '/user' }"
          @click="$router.push('/user')"
        >
          个人中心
        </li>
        <li
          :class="{ active: $route.path === '/order' }"
          @click="$router.push('/order')"
        >
          我的订单
        </li>
        <li
          :class="{ active: $route.path === '/free' }"
          @click="$router.push('/free')"
        >
          专属福利
        </li>
      </ul>
      <div class="header-search">
        <input type="text" placeholder="输入关键字" />
        <button></button>
      </div>
    </div>
  </header>
</template>

<script>
export default {};
</script>

<style lang="less" scpoed>
header {
  height: 104px;
  margin-bottom: 14px;
  .header-box {
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .logo {
      align-self: start;
      margin-top: 14px;
      a {
        display: block;
      }
    }
    .header-nav {
      display: flex;
      justify-content: space-between;
      width: 500px;
      // margin: 59px 86px 0 94px;
      // box-sizing: border-box;
      li {
        cursor: pointer;
        &.active {
          color: #0a328e;
        }
      }
    }
    .header-search {
      display: flex;
      align-items: center;
      input {
        width: 214px;
        height: 40px;
        border: 1px solid #dedede;
        border-radius: 20px 0px 0px 20px;
        outline: none;
        box-sizing: border-box;
        padding-left: 19px;
      }
      button {
        width: 50px;
        height: 40px;
        background: #0a328e url("../assets/img/search.png") no-repeat center;
        border-radius: 0px 20px 20px 0px;
        border: none;
        cursor: pointer;
      }
    }
  }
}
</style>